package com.my.cd.factory.abstractFactory;

import com.my.cd.factory.pizza.LDCheesePizza;
import com.my.cd.factory.pizza.LDPepperPizza;
import com.my.cd.factory.pizza.Pizza;

/**
 * 抽象工厂的具体实现：伦敦披萨工厂
 */
public class LDFactory implements AbstractFactory {

    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;

        if (orderType.equals("cheese")) {
            pizza = new LDCheesePizza();
        } else if (orderType.equals("pepper")) {
            pizza = new LDPepperPizza();
        }
        return pizza;

    }

}
